package view.plugin
{
	//左下角房间信息
	
	import flash.display.MovieClip;
	import flash.display.Sprite;
	import flash.text.TextField;
	
	import global.Resource;
	
	import model.GameModel;
	import model.MeInfoModel;
	
	public class RoomInfo extends Sprite
	{
		private var roomName:TextField = null;
		private var tableID:TextField = null;
		
		public function RoomInfo()
		{
			super();
			
			var main:MovieClip = Resource.i.getMovieClip("common", "RoomInfo");
			addChild(main);
			roomName = main.roomName;
			tableID = main.tableID;
		}
		
		public function updateData():void
		{
			roomName.text = "【"+GameModel.i.gameServer.szServerName+"】";
			var td:int = MeInfoModel.i.userStatus.wTableID;
			if(td == -1)
			{
				tableID.text = "";
			}
			else
			{
				tableID.text = "第" + (td+1).toString() + "桌";
			}
		}
	}
}